<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加员工信息</title>
    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/static/plupload/upfiless.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/Theme1/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/Theme1/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><{$rs_staffShow.stName}>的个人档案 <a style="margin-left: 15px; color:#06cbc4" href="__URL__/lists">返回列表</a></h5>
                        <div class="ibox-tools">
                            
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form method="post" action="__URL__/AddAction" class="form-horizontal" id="form-admin-add" enctype="multipart/form-data">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">基本信息</label>
                                <div class="col-sm-10" style="margin-top: 8px">
								<php> $hunyinInfo=""; $hunyinId=$rs_staffShow["stMarital"];
									$variables=M("variables");
									$rs_variables=$variables->where("vId=4")->find();
									$hunyin=explode("|",$rs_variables["vVariablesVal"]);
									foreach($hunyin as $key=>$valhunyin){ if($key==$hunyinId){
									$hunyinInfo=$valhunyin; } } 
								</php>
                                    <span><{$rs_staffShow.stName}></span> <span >
                                    <if condition="$rs_staffShow.stSex eq 1">
                                    &nbsp;&nbsp;&nbsp;&nbsp;男&nbsp;&nbsp;&nbsp;&nbsp;
                                    <else/>
                                    &nbsp;&nbsp;&nbsp;&nbsp;女 &nbsp;&nbsp;&nbsp;&nbsp;
                                    </if>
                                    <if condition="$rs_staffShow.stBirthdateType eq 1">公历&nbsp;
                                    <else/>
                                    农历&nbsp;
                                    </if>
                                    <{$rs_staffShow.stBirthdate}> 出生 &nbsp;&nbsp;&nbsp;&nbsp;今年 <{$nowAge}> 岁&nbsp;&nbsp;&nbsp;&nbsp;<{$hunyinInfo}>
                                    </span>
                                </div>
                            </div>
                            <div class="form-group" >
                                <label class="col-sm-1 control-label"></label>
                                <div class="col-sm-10" style="margin-top: 8px">
                                
                                联系电话：<{$rs_staffShow.stTel}>&nbsp;&nbsp;&nbsp;&nbsp;
                                来自：<{$rs_staffShow.stNativePlace}>&nbsp;&nbsp;&nbsp;&nbsp;
                                现居住：<{$rs_staffShow.stCity}>&nbsp;&nbsp;&nbsp;&nbsp;
                                </div>
                            </div>
                            
                            <div class="hr-line-dashed"></div>

                            <div class="form-group" >
                                <label class="col-sm-1 control-label">相关信息</label>
                                <div class="col-sm-10" style="margin-top: 8px">
                                
                                所在部门：<{$rs_department.dName}>&nbsp;&nbsp;&nbsp;&nbsp;
                                <php>
                                $zhichengInfo="";
                                $zhichengId=$rs_staffShow["stPositionalTitles"];
                                $variables=M("variables");
                                $rs_variables=$variables->where("vId=2")->find();
                                $zhicheng=explode("|",$rs_variables["vVariablesVal"]);
                                foreach($zhicheng as $key=>$valzhicheng){
                                    if($key==$zhichengId){
                                    $zhichengInfo=$valzhicheng;
                                    }
                                    
                                }
                                </php>  
                                职称：<{$zhichengInfo}>&nbsp;&nbsp;&nbsp;&nbsp;
                                <php>
                                $zhiwuInfo="";
                                $zhiwuId=$rs_staffShow["stDuties"];
                                $variables=M("variables");
                                $rs_variables=$variables->where("vId=3")->find();
                                $zhiwu=explode("|",$rs_variables["vVariablesVal"]);
                                foreach($zhiwu as $key=>$valzhiwu){
                                    if($key==$zhiwuId){
                                    $zhiwuInfo=$valzhiwu;
                                    }
                                    
                                }
                                </php>  
                                职务：<{$zhiwuInfo}>&nbsp;&nbsp;&nbsp;&nbsp;
                                </div>
                            </div>
                            <div class="form-group" >
                                <label class="col-sm-1 control-label"></label>
                                <div class="col-sm-10" style="margin-top: 8px">
                                入职日期：<{$rs_staffShow.stEntryDate}>&nbsp;&nbsp;&nbsp;&nbsp;
                                工龄：<{$nowWorkingYear}> 年&nbsp;&nbsp;&nbsp;&nbsp;
                                工作状态：
                                <if condition="$rs_staffShow.stJobState eq 1">在职<else/>已离职</if>
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>

                            <div class="form-group" >
                                <label class="col-sm-1 control-label">个人信息</label>
                                <div class="col-sm-10" style="margin-top: 8px">
                                编号：<{$rs_staffShow.stNum}>&nbsp;&nbsp;&nbsp;&nbsp;
                                <php>
                                $xueliInfo="";
                                $xueliId=$rs_staffShow["stDegrees"];
                                $variables=M("variables");
                                $rs_variables=$variables->where("vId=1")->find();
                                $xueli=explode("|",$rs_variables["vVariablesVal"]);
                                foreach($xueli as $key=>$valxueli){
                                    if($key==$xueliId){
                                    $xueliInfo=$valxueli;
                                    }
                                    
                                }
                                </php> 
								<php> $minzuInfo=""; $minzuId=$rs_staffShow["stMultiracial"];
									$variables=M("variables");
									$rs_variables=$variables->where("vId=5")->find();
									$minzu=explode("|",$rs_variables["vVariablesVal"]);
									foreach($minzu as $key=>$valminzu){ if($key==$minzuId){
									$minzuInfo=$valminzu; } } 
								</php>
                                学历：<{$xueliInfo}>&nbsp;&nbsp;&nbsp;&nbsp;
                                民族：<{$minzuInfo}>
                                </div>
                            </div>
                            <div class="form-group" >
                                <label class="col-sm-1 control-label"></label>
                                <div class="col-sm-10" style="margin-top: 8px">
                                政治面貌：<{$rs_staffShow.stPoliticalIandscape}>&nbsp;&nbsp;&nbsp;&nbsp;
                                身高：<if condition="$rs_staffShow.stHeight eq 0">未录入<else/><{$rs_staffShow.stHeight}> CM</if>&nbsp;&nbsp;&nbsp;&nbsp;
                                体重：
                                <if condition="$rs_staffShow.stWeight eq 0">未录入<else/><{$rs_staffShow.stWeight}> KG</if>
                                </div>
                            </div>
                            <div class="form-group" >
                                <label class="col-sm-1 control-label"></label>
                                <div class="col-sm-10" style="margin-top: 8px">
                                身份证号：<{$rs_staffShow.stIDCard}>&nbsp;&nbsp;&nbsp;&nbsp;
                                QQ：<{$rs_staffShow.stQQ}>&nbsp;&nbsp;&nbsp;&nbsp;
                                邮箱：<{$rs_staffShow.stEmail}>
                                </div>
                            </div>
                            <div class="form-group" >
                                <label class="col-sm-1 control-label"></label>
                                <div class="col-sm-10" style="margin-top: 8px">
                                工作经验：<{$rs_staffShow.stJingyuan}>

                                </div>
                            </div>
                            <div class="form-group" >
                                <label class="col-sm-1 control-label"></label>
                                <div class="col-sm-10" style="margin-top: 8px">
                                掌握技能：<{$rs_staffShow.stJineng}>
                                </div>
                            </div>

 


                            
                            
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="__PUBLIC__/Theme1/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/Theme1/js/content.min.js?v=1.0.0"></script>
    <script src="__PUBLIC__/Theme1/js/plugins/iCheck/icheck.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/jquery.validate.min.js"></script> 

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/messages_zh.min.js"></script> 

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/validate-methods.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Theme1/lib/webuploader/0.1.5/webuploader.min.js"></script> 

    <script>
        $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    </script>
    
    <script type="text/javascript">
	$(function(){
	$("#form-admin-add").validate({
		rules:{
            stNum:{
                required:true,
                minlength:1,
                maxlength:8
            },
            stName:{
                required:true,
                minlength:2,
                maxlength:16
            },
            stSex:{
                required:true,
            },
            stBirthdate:{
                required:true,
            },
            sCompanyIntroduce:{
                required:true,
            },
            stTel:{
                required:true,
                minlength:7,
                maxlength:11
            },
            stDegrees:{
                required:true,
            },
            stEntryDate:{
                required:true,
            },
            stDid:{
                required:true,
            },
            stPositionalTitles:{
                required:true,
            },
            stDuties:{
                required:true,
            },
            stMultiracial:{
                required:true,
            },
            stNativePlace:{
                required:true,
            },
            stIDCard:{
                //required:true,
                minlength:15,
                maxlength:18
            }
            
        },
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			$(form).ajaxSubmit();
			var index = parent.layer.getFrameIndex(window.name);
			parent.$('.btn-refresh').click();
			parent.layer.close(index);
		}
	});
});
</script> 
    
<script type="text/javascript" src="__PUBLIC__/Theme1/static/plupload/plupload.full.min.js"></script>
<script type="text/javascript">
            var uploader = new plupload.Uploader(
                  {
                    runtimes: 'html5,flash,silverlight,html4', //上传插件初始化选用那种方式的优先级顺序
                    browse_button: 'btn', // 上传按钮
                    url: "__URL__/up", //远程上传地址
                    flash_swf_url: '__PUBLIC__/plupload/Moxie.swf', //flash文件地址
                    silverlight_xap_url: '__PUBLIC__/plupload/Moxie.xap', //silverlight文件地址
                    filters: {
                        max_file_size: '2mb', //最大上传文件大小（格式100b, 10kb, 10mb, 1gb）
                        mime_types: [//允许文件上传类型
                            {title: "files", extensions: "jpg,png,gif"}
                        ]
                 },
                multi_selection: true, //true:ctrl多文件上传, false 单文件上传
                init: {
                    FilesAdded: function(up, files) { //文件上传前
                        if ($("#ul_pics").children("li").length >7) {
                            alert("您上传的图片太多了！");
                            uploader.destroy();
                        } else {
                            var dd = '';
                            plupload.each(files, function(file) { //遍历文件
                                dd += "<dd id='" + file['id'] + "'><div class='progress'><span class='bar'></span><span class='percent'>0%</span></div></dd>";
                            });
                            $("#ul_pics").append(dd);
                            uploader.start();
                        }
                    },
                    UploadProgress: function(up, file) { //上传中，显示进度条
                 var percent = file.percent;
                        $("#ul_pics" + file.id).find('.bar').css({"width": percent + "%"});
                        $("#ul_pics" + file.id).find(".percent").text(percent + "%");
                    },
                    FileUploaded: function(up, file, info) { //文件上传成功的时候触发
                       var data = eval("(" + info.response + ")");
                        $("#" + file.id).html("<img src='__ROOT__/" + data.pic + "'/>");
                        var old=$("#pPic").val();
                         $("#pPic").val(old + data.pic+'###');
                    },
                    Error: function(up, err) { //上传出错的时候触发
                        alert(err.message);
                    }
                }
            });
            uploader.init();
        </script>  
</body>

</html>
